{% assign domain = include.domain %}
<div class="{% if domain.experimental %} domain-experimental {% endif %}">

<paper-material elevation="1" class="heading-domain">
  <h2 class="heading"><span>{{domain.domain}}</span> Domain</h2>

  <p class="description">
    {{domain.description}}
  </p>
  {% include experimental.html item=domain %}
</paper-material>

{% comment %}
Hide entries marked with "redirect". Those are just for backwards compatibility.
{% endcomment %}

{% assign commands = (domain.commands | where_exp: "item", "item.redirect == nil") %}
{% assign events = (domain.events | where_exp: "item", "item.redirect == nil") %}
{% assign types = (domain.types | where_exp: "item", "item.redirect == nil") %}

{% if commands[0] %}
<h3 id="methods">Methods</h3>
<paper-material elevation="1" class="methods">
  {% for method in commands %}
    {% include method.html method=method domain=domain %}
  {% endfor %}
</paper-material>
{% endif %}

{% if events[0] %}
<h3 id="events">Events</h3>
<paper-material elevation="1" class="events">
  {% for event in events %}
    {% include event.html event=event domain=domain %}
  {% endfor %}
</paper-material>
{% endif %}

{% if types[0] %}
<h3 id="types">Types</h3>
<paper-material elevation="1" class="types">
  {% for type in types %}
    {% include type.html type=type %}
  {% endfor %}
</paper-material>
{% endif %}

</div>
